package cn.cs.client;

import cn.cs.config.CsConfiguration;
import cn.cs.fallback.AdBannerFallBack;
import cn.cs.fallback.AgentSettlementFallBack;
import cn.cs.pojo.AgentSettlement;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * Created by yuexl
 */
@FeignClient(name = "cs-shop-provider", configuration = CsConfiguration.class, fallback = AgentSettlementFallBack.class)
public interface AgentSettlementClient {

    @RequestMapping(value = "/getAgentSettlementById", method = RequestMethod.POST)
    public AgentSettlement getAgentSettlementById(@RequestParam("id") String id) throws Exception;

    @RequestMapping(value = "/getShopSettlementDetailedById", method = RequestMethod.POST)
    public Map<String, String> getShopSettlementDetailedById(@RequestParam("id") String id) throws Exception;

    @RequestMapping(value = "/getAgentSettlementListByMap", method = RequestMethod.POST)
    public List<AgentSettlement> getAgentSettlementListByMap(@RequestBody Map<String, Object> param) throws Exception;

    @RequestMapping(value = "/getAgentSettlementCountByMap", method = RequestMethod.POST)
    public Integer getAgentSettlementCountByMap(@RequestBody Map<String, Object> param) throws Exception;

    @RequestMapping(value = "/addAgentSettlement", method = RequestMethod.POST)
    public Integer addAgentSettlement(@RequestBody AgentSettlement agentSettlement) throws Exception;

    @RequestMapping(value = "/modifyAgentSettlement", method = RequestMethod.POST)
    public Integer modifyAgentSettlement(@RequestBody AgentSettlement agentSettlement) throws Exception;

    @RequestMapping(value = "/deleteAgentSettlementById", method = RequestMethod.POST)
    public Integer deleteAgentSettlementById(@RequestParam("id") String id) throws Exception;

    @RequestMapping(value = "/updateShopSettlementDetailedState", method = RequestMethod.POST)
    public Integer updateShopSettlementDetailedState(@RequestParam("id")String id, @RequestParam("personId")String personId)throws Exception;

}

